package com.un.ebs.inventory.domain;

import java.util.Date;
import com.un.ebs.inventory.enums.InventoryTypeEnum;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (InventoryNote)表实体类
 *
 * @author liubo
 * @since 2020-10-18 19:54:08
 */
@Data
@Component
@TableName("tb_inventory_note")
@SuppressWarnings("serial")
public class InventoryNote extends Model<InventoryNote> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "warehouse_id", length = 40, precision = 0)
    private String warehouseId;

    @DbField(name = "warehouse_to_id", length = 40, precision = 0)
    private String warehouseToId;

    @DbField(name = "note_type_id", length = 40, precision = 0)
    private String noteTypeId;

    @DbField(name = "inventory_type", length = -1, precision = 0)
    private InventoryTypeEnum inventoryType;

    @DbField(name = "relation_note_id", length = 40, precision = 0)
    private String relationNoteId;

    @DbField(name = "relation_note_type_id", length = 40, precision = 0)
    private String relationNoteTypeId;

    @DbField(name = "code", length = 100, precision = 0)
    private String code;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at_name", length = 100, precision = 0)
    private String createAtName;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @DbField(name = "submit_status", length = -1, precision = 0)
    private Boolean submitStatus;

    @DbField(name = "submit_time", length = -1, precision = 0)
    private Date submitTime;

    @DbField(name = "submit_at", length = 40, precision = 0)
    private String submitAt;

    @DbField(name = "submit_at_name", length = 100, precision = 0)
    private String submitAtName;

    @DbField(name = "audit_at", length = 40, precision = 0)
    private String auditAt;

    @DbField(name = "audit_at_name", length = 100, precision = 0)
    private String auditAtName;

    @DbField(name = "audit_time", length = -1, precision = 0)
    private Date auditTime;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @DbField(name = "audit_status", length = -1, precision = 0)
    private Boolean auditStatus;

    @DbField(name = "personnel_id", length = 40, precision = 0)
    private String personnelId;

    @DbField(name = "personnel_name", length = 100, precision = 0)
    private String personnelName;

    @TableLogic
    @DbField(name = "is_delete", length = -1, precision = 0)
    private Boolean isDelete;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @DbField(name = "remark", length = 100, precision = 0)
    private String remark;

    @DbField(name = "relation_note_code", length = 50, precision = 0)
    private String relationNoteCode;

    @DbField(name = "back_parent_id", length = 40, precision = 0)
    private String backParentId;

    @DbField(name = "workflow_pass_status", length = -1, precision = 0)
    private Boolean workflowPassStatus;

    @DbField(name = "workflow_instance_id", length = 40, precision = 0)
    private String workflowInstanceId;

    @DbField(name = "finance_code", length = 20, precision = 0)
    private String financeCode;

    @DbField(name = "finance_send_time", length = -1, precision = 0)
    private Date financeSendTime;

    @DbField(name = "finance_id", length = 10, precision = 0)
    private String financeId;

    @DbField(name = "flag", length = -1, precision = 0)
    private Integer flag;

    @DbField(name = "contract_code", length = 50, precision = 0)
    private String contractCode;

    @DbField(name = "is_rebuild", length = -1, precision = 0)
    private Boolean isRebuild;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}